rrci <- function(dt, alpha=0.05) {
  # Relative Risk 95% (default) CI
  
  if(nrow(dt)==2 && ncol(dt)==2){
    a <- dt[1, 1]
    b <- dt[1, 2]
    c <- dt[2, 1]
    d <- dt[2, 2]
    
    p1 <- a / (a + b)
    p2 <- c / (c + d)
    rr_est <- p1 / p2
    tmp <- qnorm(1-alpha/2) * sqrt(b/(a*(a+b)) + d/(c*(c+d)))
    c1 <- exp(log(rr_est) - tmp)
    c2 <- exp(log(rr_est) + tmp)
    
    return(c(c1, c2))
  }else{
    return(0)
  }

}
